import cName from "classnames";
import styles from "./index.module.less";

interface CustomTagProps {
  type?: "default" | "select";
  name: string;
  icon: any;
  onClick?: (e) => void;
}

const CustomTag = (props: CustomTagProps) => {
  const { type = "default", name, icon, onClick } = props;

  return (
    <div
      className={cName(styles["custom-tag"], styles[`custom-tag-${type}`])}
      onClick={onClick && onClick}
    >
      {icon}
      <span className={styles["label"]}>{name}</span>
    </div>
  );
};

export default CustomTag;
